<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      div .score{
        font-size: 50px;
        color: red;
        text-align: center;
      }
      input {
         width: 300px;
        margin: 70px 550px;
        cursor: pointer;
        min-height: 0;
        height: 20px;
      }
    </style>
  </head>
  <body>
    <div class="box">
      <div class="score"><span>分数:0</span></div>
      <input  type="range" id="slider" value="0" " />
    </div>
    <script>
      const input = document.querySelector('#slider')
      const span = document.querySelector('.score span')
      input.addEventListener('click', function () {
        span.innerHTML = '分数：' + input.value
      })
    </script>
  </body>
</html>
